//
//  LCInviteAdPosterView.m
//  lechuang
//
//  Created by Mr_hi on 2025/4/18.
//  Copyright © 2025 Mooyi. All rights reserved.
//

#import "LCInviteAdPosterView.h"
#import "LCUserModel.h"

@interface LCInviteAdPosterView ()

@property (weak, nonatomic) IBOutlet UIImageView *qrcodeImgView;

@property (weak, nonatomic) IBOutlet UILabel *shareCodeLb;

@property (weak, nonatomic) IBOutlet UIView *outsideView;

@property (weak, nonatomic) IBOutlet UIView *bottomView;

@end


@implementation LCInviteAdPosterView

-(instancetype)initForNib {
    self = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self.class) owner:nil options:nil][0];
    [self configUI];
    return self;
}

- (void)configUI {
    
    LCUserModel * userModel = [LCUserModel mj_objectWithKeyValues:LCUserDefGet(UserInfo)];
    self.shareCodeLb.text = userModel.share.code;
    [self.qrcodeImgView sd_setImageWithURL:[NSURL URLWithString:userModel.share.qrcode]];
    
    self.outsideView.layer.shadowColor = [UIColor colorWithHexString:@"#000000" alpha:0.16].CGColor;
    self.outsideView.layer.shadowOffset = CGSizeMake(0, 2);
    self.outsideView.layer.shadowOpacity = 1;
    self.outsideView.layer.shadowRadius = 3;
    self.outsideView.layer.cornerRadius = 6;
    self.outsideView.clipsToBounds = false;

    [self.bottomView quickSetViewRoundCornWithCorneradius:6 andDerection:UIRectCornerTopLeft|UIRectCornerTopRight];
}

@end
